package com.stars.empoly.vmodel

import android.app.Application
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import com.stars.empoly.update.bean.UpdateBean
import com.stars.empoly.utils.net.NetEngine
import com.trailer.base.base.BRepository
import com.trailer.base.base.BViewModel
import kotlinx.coroutines.launch

/**
 *
 *on 2021/3/3
 */
class MainVModel(application: Application) : BViewModel<BRepository>(application) {


    var bean=MutableLiveData<UpdateBean>()

    
    fun getAppConfig(){
        viewModelScope.launch {
            var it=repository().lreq { NetEngine.service.payOrder("0") }
            if(it.ok()){
                bean.value=it.data
            }

        }
    }



}
